package evol;

import java.util.ArrayList;

import func.rank.RankFunction;

import nodes.Node;
import nodes.visitor.DisplayNodeVisitor;
import nodes.visitor.NodeVisitor;

public class FirstNodeOutputter implements TreeOutputter {

	private NodeVisitor v = new DisplayNodeVisitor();
	private int gen = 1;
	
	@Override
	public <T> void output(ArrayList<Node<T>> population, RankFunction<T> rank) {
		System.out.println("Generation: " + gen);
		gen++;
		population.get(0).accept(v);
	}
}
